<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SPHinXsys: SPHINXsys/src/shared/regression_test/time_averaged_method.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SPHinXsys
   &#160;<span id="projectnumber">alpha version</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_3dc1dabd28ba78e072d14d3fcfc90454.html">SPHINXsys</a></li><li class="navelem"><a class="el" href="dir_48ea983704c43b6d88c1fa3f4d09e369.html">src</a></li><li class="navelem"><a class="el" href="dir_0a0d9ef1793521534f0094f317758287.html">shared</a></li><li class="navelem"><a class="el" href="dir_5c67922b6cde2fa39f34d8eef4d1ff24.html">regression_test</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">time_averaged_method.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="time__averaged__method_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* -------------------------------------------------------------------------*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">*                               SPHinXsys                                   *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">* --------------------------------------------------------------------------*</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">* SPHinXsys (pronunciation: s&#39;finksis) is an acronym from Smoothed Particle *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">* Hydrodynamics for industrial compleX systems. It provides C++ APIs for    *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">* physical accurate simulation and aims to model coupled industrial dynamic *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">* systems including fluid, solid, multi-body dynamics and beyond with SPH   *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment">* (smoothed particle hydrodynamics), a meshless computational method using  *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">* particle discretization.                                                  *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">*                                                                           *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">* SPHinXsys is partially funded by German Research Foundation               *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">* (Deutsche Forschungsgemeinschaft) DFG HU1527/6-1, HU1527/10-1             *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment">* and HU1527/12-1.                                                          *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">*                                                                           *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">* Portions copyright (c) 2017-2020 Technical University of Munich and       *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">* the authors&#39; affiliations.                                                *</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*                                                                           *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">* Licensed under the Apache License, Version 2.0 (the &quot;License&quot;); you may   *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment">* not use this file except in compliance with the License. You may obtain a *</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment">* copy of the License at http://www.apache.org/licenses/LICENSE-2.0.        *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment">*                                                                           *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">* --------------------------------------------------------------------------*/</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;regression_test_base.hpp&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_s_p_h.html">SPH</a></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">template</span>&lt;<span class="keyword">class</span> ObserveMethodType&gt;</div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_regression_test_time_averaged.html">   40</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html">RegressionTestTimeAveraged</a> : <span class="keyword">public</span> <a class="code" href="class_s_p_h_1_1_regression_test_base.html">RegressionTestBase</a>&lt;ObserveMethodType&gt;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    {</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;        <span class="comment">/* identify the variable type from the parent class. */</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="keyword">using</span> VariableType = decltype(ObserveMethodType::type_indicator_);</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;        <span class="keywordtype">int</span> snapshot_for_converged_ ;                 <span class="comment">/* the index of the steady converged starting point. */</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        std::string mean_variance_filefullpath_;      <span class="comment">/* the file path for mean and variance. (.xml) */</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        std::string filefullpath_filter_output_;      <span class="comment">/* the file path for filtered output. */</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        <a class="code" href="class_s_p_h_1_1_xml_engine.html">XmlEngine</a> mean_variance_xml_engine_in_;       <span class="comment">/* xml engine for mean and variance input. */</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        <a class="code" href="class_s_p_h_1_1_xml_engine.html">XmlEngine</a> mean_variance_xml_engine_out_;      <span class="comment">/* xml engine for mean and variance output. */</span></div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;        </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        VariableType threshold_mean_, threshold_variance_;  <span class="comment">/* the container of threshold value for mean and variance. */</span></div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;        StdVec&lt;VariableType&gt; meanvalue_, meanvalue_new_;    <span class="comment">/* the container of (new) meanvalue. */</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;        StdVec&lt;VariableType&gt; variance_, variance_new_;      <span class="comment">/* the container of (new) variance. */</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        StdVec&lt;VariableType&gt; local_meanvalue_;              <span class="comment">/* the container of meanvalue for current result. */</span></div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        </div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a400f76d3203ec1f7d6c1fd4caa1329de">filterLocalResult</a>(DoubleVec&lt;Real&gt; &amp;current_result);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a400f76d3203ec1f7d6c1fd4caa1329de">filterLocalResult</a>(DoubleVec&lt;Vecd&gt; &amp;current_result);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a400f76d3203ec1f7d6c1fd4caa1329de">filterLocalResult</a>(DoubleVec&lt;Matd&gt; &amp;current_result);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a15897128c44c33ecffc2bec85fb4ccc3">searchSteadyStart</a>(DoubleVec&lt;Real&gt; &amp;current_result);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a15897128c44c33ecffc2bec85fb4ccc3">searchSteadyStart</a>(DoubleVec&lt;Vecd&gt; &amp;current_result);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a15897128c44c33ecffc2bec85fb4ccc3">searchSteadyStart</a>(DoubleVec&lt;Matd&gt; &amp;current_result);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a9e897ed946fa84afe6c2624a5b46f80b">calculateNewVariance</a>(DoubleVec&lt;Real&gt; &amp;current_result, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;local_meanvalue, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;variance, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;variance_new);</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a9e897ed946fa84afe6c2624a5b46f80b">calculateNewVariance</a>(DoubleVec&lt;Vecd&gt; &amp;current_result, StdVec&lt;Vecd&gt; &amp;local_meanvalue, StdVec&lt;Vecd&gt; &amp;variance, StdVec&lt;Vecd&gt; &amp;variance_new);</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a9e897ed946fa84afe6c2624a5b46f80b">calculateNewVariance</a>(DoubleVec&lt;Matd&gt; &amp;current_result, StdVec&lt;Matd&gt; &amp;local_meanvalue, StdVec&lt;Matd&gt; &amp;variance, StdVec&lt;Matd&gt; &amp;variance_new);</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a03c15934c73e44ef45c11475c3245d71">compareParameter</a>(<span class="keywordtype">string</span> par_name, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;parameter, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;parameter_new, Real &amp;threshold);</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a03c15934c73e44ef45c11475c3245d71">compareParameter</a>(<span class="keywordtype">string</span> par_name, StdVec&lt;Vecd&gt; &amp;parameter, StdVec&lt;Vecd&gt; &amp;parameter_new, Vecd &amp;threshold);</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a03c15934c73e44ef45c11475c3245d71">compareParameter</a>(<span class="keywordtype">string</span> par_name, StdVec&lt;Matd&gt; &amp;parameter, StdVec&lt;Matd&gt; &amp;parameter_new, Matd &amp;threshold);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aa72b7029d93a690ff6699be64c76d3b9">testNewResult</a>(DoubleVec&lt;Real&gt; &amp;current_result, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;meanvalue, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;local_meanvalue, <a class="code" href="class_std_vec_3_01_real_01_4.html">StdVec&lt;Real&gt;</a> &amp;variance);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aa72b7029d93a690ff6699be64c76d3b9">testNewResult</a>(DoubleVec&lt;Vecd&gt; &amp;current_result, StdVec&lt;Vecd&gt; &amp;meanvalue, StdVec&lt;Vecd&gt; &amp;local_meanvalue, StdVec&lt;Vecd&gt; &amp;variance);</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aa72b7029d93a690ff6699be64c76d3b9">testNewResult</a>(DoubleVec&lt;Matd&gt; &amp;current_result, StdVec&lt;Matd&gt; &amp;meanvalue, StdVec&lt;Matd&gt; &amp;local_meanvalue, StdVec&lt;Matd&gt; &amp;variance);</div><div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        </div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;        <span class="keyword">template</span>&lt;<span class="keyword">typename</span>... ConstructorArgs&gt;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;        <span class="keyword">explicit</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html">RegressionTestTimeAveraged</a>(ConstructorArgs &amp;&amp;...args) :</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;            <a class="code" href="class_s_p_h_1_1_regression_test_base.html">RegressionTestBase&lt;ObserveMethodType&gt;</a>(std::forward&lt;ConstructorArgs&gt;(args)...),</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;            mean_variance_xml_engine_in_(<span class="stringliteral">&quot;mean_variance_xml_engine_in_&quot;</span>, <span class="stringliteral">&quot;meanvariance&quot;</span>),</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;            mean_variance_xml_engine_out_(<span class="stringliteral">&quot;mean_variance_xml_engine_out_&quot;</span>, <span class="stringliteral">&quot;meanvariance&quot;</span>)</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        {</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;            mean_variance_filefullpath_ = this-&gt;input_folder_path_ + <span class="stringliteral">&quot;/&quot;</span> + this-&gt;body_name_</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                + <span class="stringliteral">&quot;_&quot;</span> + this-&gt;quantity_name_ + <span class="stringliteral">&quot;_time_averaged_mean_variance.xml&quot;</span>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        };</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html">RegressionTestTimeAveraged</a>() {};</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a622f8618bab75f36e56a713bf4e89615">initializeThreshold</a>(VariableType &amp;threshold_mean, VariableType &amp;threshold_variance);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;        <span class="keywordtype">void</span> settingupTheTest();  </div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a6a84508bedab4d15b399451f2a37462b">readMeanVarianceFromXml</a>();  </div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aea0ca51a8c49bd413314ff5fbfff5904">searchForStartPoint</a>(); </div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a1b4e1fb0a6f9454834003c3f246a2fac">filterExtremeValues</a>();  </div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a87251561ae10d6858ab3982ff44bd937">updateMeanVariance</a>();  </div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a98662f8e4692378cfc46932f13485cdc">writeMeanVarianceToXml</a>();  </div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a44a2a1a9d720699f0b30d9f59c4a7947">compareMeanVariance</a>();  </div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a173d112f4b9abd96ccb113e76dff887a">resultTest</a>();  </div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        <span class="comment">/* the interface for generating the priori converged result with time-averaged meanvalue and variance. */</span></div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_regression_test_time_averaged.html#a6e2fdf538fc07a48ec53e81cf5a75ea6">  106</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a6e2fdf538fc07a48ec53e81cf5a75ea6">generateDataBase</a>(VariableType threshold_mean, VariableType threshold_variance, <span class="keywordtype">string</span> filter = <span class="stringliteral">&quot;false&quot;</span>)</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;        {</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;            this-&gt;<a class="code" href="class_s_p_h_1_1_regression_test_base.html#ab3d8b4dc96c620f87f42c686118428ea">writeXmlToXmlFile</a>(); <span class="comment">/* currently defined in in_output. */</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;            this-&gt;<a class="code" href="class_s_p_h_1_1_regression_test_base.html#af48d6fc4f929a729e9c409e154e831b3">readXmlFromXmlFile</a>();<span class="comment">/* currently defined in in_output. */</span></div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;            <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a622f8618bab75f36e56a713bf4e89615">initializeThreshold</a>(threshold_mean, threshold_variance);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;            <span class="keywordflow">if</span> (this-&gt;converged == <span class="stringliteral">&quot;false&quot;</span>)</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;            {</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                settingupTheTest();</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                <span class="keywordflow">if</span> (filter == <span class="stringliteral">&quot;true&quot;</span>)</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;                    <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a1b4e1fb0a6f9454834003c3f246a2fac">filterExtremeValues</a>(); <span class="comment">/* Pay attention to use this filter. */</span></div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aea0ca51a8c49bd413314ff5fbfff5904">searchForStartPoint</a>(); <span class="comment">/* searching starting point with snapshot*observation data structure, and it is dynamic varying. */</span></div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                this-&gt;transposeTheIndex(); <span class="comment">/* transpose the snapshot and observation, and it is defined in Base. */</span></div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a6a84508bedab4d15b399451f2a37462b">readMeanVarianceFromXml</a>();</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a87251561ae10d6858ab3982ff44bd937">updateMeanVariance</a>();</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;                this-&gt;<a class="code" href="class_s_p_h_1_1_regression_test_base.html#ad2a4d4a8f5c6776fbfd9050db2bc4bc7">writeResultToXml</a>(this-&gt;number_of_run_ - 1); <span class="comment">/* the result is output as separately. */</span></div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a98662f8e4692378cfc46932f13485cdc">writeMeanVarianceToXml</a>();</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a44a2a1a9d720699f0b30d9f59c4a7947">compareMeanVariance</a>(); <span class="comment">/* To identify whether the current mean and variance are converged or not.*/</span></div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            }</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <span class="keywordflow">else</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;                std::cout &lt;&lt; <span class="stringliteral">&quot;The results have been converged.&quot;</span> &lt;&lt; endl;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        };</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="class_s_p_h_1_1_regression_test_time_averaged.html#ae3d6fbe99724aef8759c04acf4270179">  129</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#ae3d6fbe99724aef8759c04acf4270179">newResultTest</a>(<span class="keywordtype">string</span> filter = <span class="stringliteral">&quot;false&quot;</span>)</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        {</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            this-&gt;<a class="code" href="class_s_p_h_1_1_regression_test_base.html#ab3d8b4dc96c620f87f42c686118428ea">writeXmlToXmlFile</a>(); <span class="comment">/* currently defined in in_output. */</span></div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            this-&gt;<a class="code" href="class_s_p_h_1_1_regression_test_base.html#af48d6fc4f929a729e9c409e154e831b3">readXmlFromXmlFile</a>(); <span class="comment">/* currently defined in in_output. */</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            settingupTheTest();</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <span class="keywordflow">if</span> (filter == <span class="stringliteral">&quot;true&quot;</span>)</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a1b4e1fb0a6f9454834003c3f246a2fac">filterExtremeValues</a>();</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;            <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#aea0ca51a8c49bd413314ff5fbfff5904">searchForStartPoint</a>();</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;            <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a6a84508bedab4d15b399451f2a37462b">readMeanVarianceFromXml</a>();</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;            <a class="code" href="class_s_p_h_1_1_regression_test_time_averaged.html#a173d112f4b9abd96ccb113e76dff887a">resultTest</a>();</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        }</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    };</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;}</div><div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_aa72b7029d93a690ff6699be64c76d3b9"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#aa72b7029d93a690ff6699be64c76d3b9">SPH::RegressionTestTimeAveraged::testNewResult</a></div><div class="ttdeci">int testNewResult(DoubleVec&lt; Real &gt; &amp;current_result, StdVec&lt; Real &gt; &amp;meanvalue, StdVec&lt; Real &gt; &amp;local_meanvalue, StdVec&lt; Real &gt; &amp;variance)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:305</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a87251561ae10d6858ab3982ff44bd937"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a87251561ae10d6858ab3982ff44bd937">SPH::RegressionTestTimeAveraged::updateMeanVariance</a></div><div class="ttdeci">void updateMeanVariance()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:494</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_base_html_ab3d8b4dc96c620f87f42c686118428ea"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_base.html#ab3d8b4dc96c620f87f42c686118428ea">SPH::RegressionTestBase::writeXmlToXmlFile</a></div><div class="ttdeci">void writeXmlToXmlFile()</div><div class="ttdef"><b>Definition:</b> regression_test_base.h:139</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a03c15934c73e44ef45c11475c3245d71"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a03c15934c73e44ef45c11475c3245d71">SPH::RegressionTestTimeAveraged::compareParameter</a></div><div class="ttdeci">int compareParameter(string par_name, StdVec&lt; Real &gt; &amp;parameter, StdVec&lt; Real &gt; &amp;parameter_new, Real &amp;threshold)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:230</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a400f76d3203ec1f7d6c1fd4caa1329de"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a400f76d3203ec1f7d6c1fd4caa1329de">SPH::RegressionTestTimeAveraged::filterLocalResult</a></div><div class="ttdeci">void filterLocalResult(DoubleVec&lt; Real &gt; &amp;current_result)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:15</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_base_html_ad2a4d4a8f5c6776fbfd9050db2bc4bc7"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_base.html#ad2a4d4a8f5c6776fbfd9050db2bc4bc7">SPH::RegressionTestBase::writeResultToXml</a></div><div class="ttdeci">void writeResultToXml()</div><div class="ttdef"><b>Definition:</b> regression_test_base.hpp:112</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a1b4e1fb0a6f9454834003c3f246a2fac"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a1b4e1fb0a6f9454834003c3f246a2fac">SPH::RegressionTestTimeAveraged::filterExtremeValues</a></div><div class="ttdeci">void filterExtremeValues()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:465</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a98662f8e4692378cfc46932f13485cdc"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a98662f8e4692378cfc46932f13485cdc">SPH::RegressionTestTimeAveraged::writeMeanVarianceToXml</a></div><div class="ttdeci">void writeMeanVarianceToXml()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:509</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a6e2fdf538fc07a48ec53e81cf5a75ea6"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a6e2fdf538fc07a48ec53e81cf5a75ea6">SPH::RegressionTestTimeAveraged::generateDataBase</a></div><div class="ttdeci">void generateDataBase(VariableType threshold_mean, VariableType threshold_variance, string filter=&quot;false&quot;)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.h:106</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a622f8618bab75f36e56a713bf4e89615"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a622f8618bab75f36e56a713bf4e89615">SPH::RegressionTestTimeAveraged::initializeThreshold</a></div><div class="ttdeci">void initializeThreshold(VariableType &amp;threshold_mean, VariableType &amp;threshold_variance)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:404</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a173d112f4b9abd96ccb113e76dff887a"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a173d112f4b9abd96ccb113e76dff887a">SPH::RegressionTestTimeAveraged::resultTest</a></div><div class="ttdeci">void resultTest()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:578</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_aea0ca51a8c49bd413314ff5fbfff5904"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#aea0ca51a8c49bd413314ff5fbfff5904">SPH::RegressionTestTimeAveraged::searchForStartPoint</a></div><div class="ttdeci">void searchForStartPoint()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:457</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a44a2a1a9d720699f0b30d9f59c4a7947"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a44a2a1a9d720699f0b30d9f59c4a7947">SPH::RegressionTestTimeAveraged::compareMeanVariance</a></div><div class="ttdeci">bool compareMeanVariance()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:533</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_base_html"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_base.html">SPH::RegressionTestBase</a></div><div class="ttdoc">The base of regression test for various method (time-averaged, ensemble-averaged, dynamic time warpin...</div><div class="ttdef"><b>Definition:</b> regression_test_base.h:45</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_base_html_af48d6fc4f929a729e9c409e154e831b3"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_base.html#af48d6fc4f929a729e9c409e154e831b3">SPH::RegressionTestBase::readXmlFromXmlFile</a></div><div class="ttdeci">void readXmlFromXmlFile()</div><div class="ttdef"><b>Definition:</b> regression_test_base.h:145</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_ae3d6fbe99724aef8759c04acf4270179"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#ae3d6fbe99724aef8759c04acf4270179">SPH::RegressionTestTimeAveraged::newResultTest</a></div><div class="ttdeci">void newResultTest(string filter=&quot;false&quot;)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.h:129</div></div>
<div class="ttc" id="class_std_vec_3_01_real_01_4_html"><div class="ttname"><a href="class_std_vec_3_01_real_01_4.html">StdVec&lt; Real &gt;</a></div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a9e897ed946fa84afe6c2624a5b46f80b"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a9e897ed946fa84afe6c2624a5b46f80b">SPH::RegressionTestTimeAveraged::calculateNewVariance</a></div><div class="ttdeci">void calculateNewVariance(DoubleVec&lt; Real &gt; &amp;current_result, StdVec&lt; Real &gt; &amp;local_meanvalue, StdVec&lt; Real &gt; &amp;variance, StdVec&lt; Real &gt; &amp;variance_new)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:191</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a6a84508bedab4d15b399451f2a37462b"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a6a84508bedab4d15b399451f2a37462b">SPH::RegressionTestTimeAveraged::readMeanVarianceFromXml</a></div><div class="ttdeci">void readMeanVarianceFromXml()</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:431</div></div>
<div class="ttc" id="class_s_p_h_1_1_xml_engine_html"><div class="ttname"><a href="class_s_p_h_1_1_xml_engine.html">SPH::XmlEngine</a></div><div class="ttdef"><b>Definition:</b> xml_engine.h:56</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html_a15897128c44c33ecffc2bec85fb4ccc3"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html#a15897128c44c33ecffc2bec85fb4ccc3">SPH::RegressionTestTimeAveraged::searchSteadyStart</a></div><div class="ttdeci">void searchSteadyStart(DoubleVec&lt; Real &gt; &amp;current_result)</div><div class="ttdef"><b>Definition:</b> time_averaged_method.hpp:120</div></div>
<div class="ttc" id="namespace_s_p_h_html"><div class="ttname"><a href="namespace_s_p_h.html">SPH</a></div><div class="ttdef"><b>Definition:</b> solid_body_supplementary.cpp:9</div></div>
<div class="ttc" id="class_s_p_h_1_1_regression_test_time_averaged_html"><div class="ttname"><a href="class_s_p_h_1_1_regression_test_time_averaged.html">SPH::RegressionTestTimeAveraged</a></div><div class="ttdoc">The regression test is based on the time-averaged meanvalue and variance. </div><div class="ttdef"><b>Definition:</b> time_averaged_method.h:40</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
